alter session set NLS_DATE_FORMAT = 'dd-mm-yyyy'; select sysdate from dual; DROP TABLE EMP cascade constraints; DROP TABLE DEPT cascade constraints; DROP TABLE SALGRADE cascade constraints; purge recyclebin; CREATE TABLE DEPT (DEPTNO NUMBER(2), DNAME VARCHAR2(14), LOC VARCHAR2(13) ); INSERT INTO DEPT VALUES (10, 'ACCOUNTING', 'NEW YORK'); INSERT INTO DEPT VALUES (20, 'RESEARCH', 'DALLAS' ); INSERT INTO DEPT VALUES (30, 'SALES', 'CHICAGO' ); INSERT INTO DEPT VALUES (40, 'OPERATIONS', 'BOSTON' ); CREATE TABLE EMP (EMPNO NUMBER(4),ENAME VARCHAR2(10), JOB VARCHAR2(9) , MGR NUMBER(4) ,HIREDATE DATE ,SAL NUMBER(7, 2), COMM NUMBER(7, 2), DEPTNO NUMBER(2)); INSERT ALL WHEN 1<2 THEN INTO EMP VALUES ( 1, 'KING', 'PRESIDENT','', '17-11-1981', 5000, '', 10) INTO EMP VALUES ( 2, 'BLAKE', 'MANAGER', 1, '01-05-1981', 2850, NULL, 30) INTO EMP VALUES ( 3, 'CLARK', 'MANAGER', 1, '09-06-1981', 2450, NULL, 10) WHEN 1<2 THEN INTO EMP VALUES ( 4, 'JONES', 'MANAGER', 1, '02-04-1981', 2975, NULL, 20) INTO EMP VALUES ( 5, 'ALLEN', 'SALESMAN', 2, '20-02-1981', 1600, 300, 30) INTO EMP VALUES ( 6, 'JAMES', 'CLERK', 2, '03-12-1981', 950, NULL, 30) INTO EMP VALUES ( 7, 'MARTIN', 'SALESMAN', 2, '28-09-1981', 1250, 1400, 30) INTO EMP VALUES ( 8, 'TURNER', 'SALESMAN', 2, '08-09-1981', 1500, 0, 30) INTO EMP VALUES ( 9, 'WARD', 'SALESMAN', 2, '22-02-1981', 1250, 500, 30) INTO EMP VALUES (10, 'MILLER', 'CLERK', 3, '23-01-1982', 1300, NULL, 10) INTO EMP VALUES (11, 'FORD', 'ANALYST', 4, '03-12-1981', 3000, NULL, 20) INTO EMP VALUES (12, 'SCOTT', 'ANALYST', 4, '09-12-1982', 3000, NULL, 20) INTO EMP VALUES (13, 'SMITH', 'CLERK', 11, '17-11-1980', 800, NULL, 20) INTO EMP VALUES (14, 'ADAMS', 'CLERK', 12, '12-01-1983', 1100, NULL, 20) ELSE INTO EMP VALUES (90, '90', '90', 90, '28-09-1981', 90, 90, 90) SELECT * FROM DUAL WHERE 1<2; CREATE TABLE SALGRADE (GRADE NUMBER, LOSAL NUMBER, HISAL NUMBER); INSERT INTO SALGRADE select 1, 700, 1200 FROM DUAL UNION ALL select 2, 1201, 1400 FROM DUAL UNION ALL select 3, 1401, 2000 FROM DUAL UNION ALL select 4, 2001, 3000 FROM DUAL UNION ALL select 5, 3001, 9999 FROM DUAL; COMMIT; select * from tab;